package online.longzipeng.back.common.enums;

/**
 * @Author: lzp
 * 统一返回结果和状态码
 * @Date: 2021/2/7 19:00
 */
public enum ResponseEnum {
    // 业务通用
    SUCCESS(200,"操作成功!!"),
    FAILED(500,"服务器出错啦!!"),
    // 用户相关返回结果
    TOKEN_TIMEOUT(720,"身份信息已过期！！请重新登录"),
    TOKEN_INVALID(721,"无效的身份信息！！请重新登录"),
    ;
    private Integer code;
    private String message;

    ResponseEnum(Integer code, String message) {
        this.code = code;
        this.message = message;
    }

    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }
}
